/**
 * version 1.0.0
 *
 * @author KKW
 * @date 2017/6/28.
 */
import com.myutil.draw.Edgedrawable;
import com.myutil.draw.Nodedrawable;
import com.myutil.draw.PlayWindows;
import com.myutil.graph.CorEdge;
import com.myutil.graph.CorNode;
import com.myutil.draw.Map;

public class Main {

    public static void main(String[] args){
        System.out.println("Hello world, this is git study!");
        CorNode[] nodes=new CorNode[8];
        for(int i=0;i<nodes.length;i++){
            int x=(int)(Math.random()*200);
            int y=(int)(Math.random()*200);
            nodes[i]=new CorNode(i, x, y);
        }
        CorEdge[] edges=new CorEdge[13];
        edges[0]=new CorEdge(0, nodes[0], nodes[1]);
        edges[1]=new CorEdge(1, nodes[0], nodes[2]);
        edges[2]=new CorEdge(2, nodes[0], nodes[6]);
        edges[3]=new CorEdge(3, nodes[2], nodes[6]);
        edges[4]=new CorEdge(4, nodes[2], nodes[1]);
        edges[5]=new CorEdge(5, nodes[2], nodes[7]);
        edges[6]=new CorEdge(6, nodes[2], nodes[4]);
        edges[7]=new CorEdge(7, nodes[2], nodes[3]);
        edges[8]=new CorEdge(8, nodes[4], nodes[5]);
        edges[9]=new CorEdge(9, nodes[5], nodes[7]);
        edges[10]=new CorEdge(10, nodes[5], nodes[3]);
        edges[11]=new CorEdge(11, nodes[1], nodes[3]);
        edges[12]=new CorEdge(12, nodes[6], nodes[7]);

        Map map=new Map(Nodedrawable.convertTo(nodes), Edgedrawable.convertTo(edges));
        PlayWindows xx=new PlayWindows(map);
    }
}
